<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="../../attr.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!doctype html>
<html>
<meta http-equiv="X-UA-Compatible" content="IE=emulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="${ctx}/css/sapar.css" />
<link rel="stylesheet" type="text/css" href="${ctx}/css/common.css" />
<script type="text/javascript" src="${ctx}/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/js/sapar.js"></script>
<script type="text/javascript" src="${ctx}/js/WdatePicker.js"></script>
<script type="text/javascript" src="${ctx}/assets/layer/layer.js"></script>
<script type="text/javascript" src="${ctx}/js/kkpager.min.js"></script>
<link rel="stylesheet" type="text/css"
	href="${ctx}/css/kkpager_blue.css" />
<title>包装管理</title>
<style>
hr {
	align: left;
	margin-left: 0px;
}

#saper-container {
	width: 99%;
	margin: 0 auto;
	border: 1px dashed blue;
}

.biaoti {
	display: block;
	color: white;
	font-weight: bold;
	width: 100px;
	height: 20px;
	font-size: 12px;
	text-align: left;
	vertical-align: middle;
}

#bt1 {
	background-color: #009933;
}

#bt2 {
	background-color: #00FFCC;
}

#bt3 {
	background-color: #0033FF;
}

#bt4 {
	background-color: #33CCFF;
}

#bt5 {
	background-color: #009933;
}

#bt51 {
	background-color: #33CCFF;
}

#bt6 {
	background-color: #00CC33;
}

#bt7 {
	background-color: #33CCFF;
}
</style>
</head>

<body>
	<div id="saper-container">
		<div id="saper-hd"></div>
		<div id="saper-bd">
			<div class="subfiled clearfix">
				<h2>追溯功能</h2>
			</div>
			<div class="subfiled-content">
				<div class="search-box clearfix">
					<div class="kv-item clearfix">
						<label>手术包条码：</label>
						<div class="kv-item-content">
							<input type="text" name="searchTxt" placeholder="手术包条码"
								value="${searchTxt}" class="search_text">
						</div>
					</div>
					<a href="javascript:;" class="sapar-btn sapar-btn-recom query-btn">查询</a>
				</div>

				<hr
					style="height: 3px; width: 40%; border: none; border-top: 2px solid #555555;" />
				<span class="biaoti" id="bt1">包信息</span>
				<div class="table">

					<!--表格具体内容-->
					<div class="table-box">
						<table>
							<thead>
								<tr>
									<th>包名</th>
									<th>所属科室</th>
									<th>流程状态</th>
								</tr>
							</thead>
							<tbody>


								<c:if test="${dabaoList != null}">
									<c:forEach items="${dabaoList}" var="dabao">
										<tr>

											<td>${dabao.packageName}</td>
											<td>${departmentname}</td>
											<td>${gongneng}</td>

										</tr>
									</c:forEach>
								</c:if>
							</tbody>
						</table>
					</div>
				</div>
				<!--表格结束-->

				<hr
					style="height: 3px; width: 40%; border: none; border-top: 2px solid #009933;" />
				<span class="biaoti" id="bt2">回收信息</span>
				<div class="table">

					<!--表格具体内容-->
					<div class="table-box">
						<table>
							<thead>
								<tr>


									<th>交接人姓名</th>
									<th>回收人姓名</th>
									<th>回收网篮条码</th>
									<th>回收时间</th>
									<th>包状态</th>
									<th>同一个回收网篮的包</th>


								</tr>
							</thead>
							<tbody>


								<c:if test="${dabaoList != null}">
									<c:forEach items="${dabaoList}" var="dabao">
										<tr>

											<td>${jiaojierenname}</td>
											<td>${huishourenname}</td>
											<td>${dabao.huishouWanglanTiaoma}</td>
											<td><fmt:formatDate value="${dabao.huishouTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>

											<td><c:if test="${dabao.huishouZhuangtai==0}">待清洗</c:if>
												<c:if test="${dabao.huishouZhuangtai==1}">清洗中</c:if>
											<c:if test="${dabao.huishouZhuangtai==2}">清洗完成</c:if>
											</td>

											<td><a href="javascript:;" id="huishouwanglan">查看详细</a></td>

										</tr>
									</c:forEach>
								</c:if>
							</tbody>
						</table>
					</div>
				</div>
				<!--表格结束-->

				<hr
					style="height: 3px; width: 40%; border: none; border-top: 2px double #00FFCC;" />
				<span class="biaoti" id="bt3">清洗信息</span>

					<!--表格具体内容-->
				<div class="table">

					
					<div class="table-box">
						<table>
							<thead>
								<tr>

									<th>清洗设备条码</th>
									<th>清洗设备名字</th>
									<th>清洗软件名字</th>
									<th>清洗人</th>
									<th>清洗开始时间</th>
									<th>清洗结束时间</th>
									<th>清洗审核人</th>
									<th>清洗审核时间</th>
									<th>清洗审核状态</th>
									<th>一起清洗的包</th>
								</tr>
							</thead>
							<tbody>


								<c:if test="${dabaoList != null}">
									<c:forEach items="${dabaoList}" var="dabao">
										<tr>

											<td>${dabao.qingxiShebeiTiaoma}</td>
											<td>${equipname}</td>
											<td>${softname}</td>
											<td>${qinxirenname}</td>
											<td><fmt:formatDate value="${dabao.qingxiKaishiTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>
											<td><fmt:formatDate value="${dabao.qingxiJieshuTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>
											<td>${shenherenname}</td>
											<td><fmt:formatDate value="${dabao.qingxiShenherenTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>
											<td><c:if test="${dabao.qingxiHege==0}">不合格</c:if> <c:if
													test="${dabao.qingxiHege==1}">合格</c:if></td>
											<td><a href="#">查看详细</a></td>


										</tr>
									</c:forEach>
								</c:if>
							</tbody>
						</table>
					</div>
				</div>
				<!--表格结束-->
				<%--小模块开始 --%>
				<hr
					style="height: 3px; width: 40%; border: none; border-top: 2px solid #0033FF;" />
				<span class="biaoti" id="bt4">配包信息</span>

				<!--表格开始-->
				<div class="table">

					<!--表格具体内容-->
					<div class="table-box">
						<table>
							<thead>
								<tr>

									<th>配包人</th>
									<th>配包时间</th>
									<th>配包审核人</th>

									<th>配包审核时间</th>
									<th>配包审核状态</th>
									<th>关包人</th>

									<th>关包时间</th>



								</tr>
							</thead>
							<tbody>


								<c:if test="${dabaoList != null}">
									<c:forEach items="${dabaoList}" var="dabao">
										<tr>

											<td>${peibaorenname}</td>
											<td><fmt:formatDate value="${dabao.peibaoTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>



											<td>${peibaoshenherenName}</td>
											<td><fmt:formatDate value="${dabao.peibaoShenherenTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>

											<td><c:if test="${dabao.peibaoHege==0}">不合格</c:if> <c:if
													test="${dabao.peibaoHege==1}">合格</c:if></td>
											<td>${guanbaorenname}</td>
											<td><fmt:formatDate value="${dabao.peibaoGuanbaoTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>
											<td>
										</tr>
									</c:forEach>
								</c:if>
							</tbody>
						</table>
					</div>
				</div>
				<!--表格结束-->
				<%--小模块结束--%>



				<%--小模块开始 --%>
				<hr
					style="height: 3px; width: 40%; border: none; border-top: 2px solid #33CCFF;" />
				<span class="biaoti" id="bt5">灭菌准备</span>

				<!--表格开始-->
				<div class="table">

					<!--表格具体内容-->
					<div class="table-box">
						<table>
							<thead>
								<tr>
									<th>灭菌准备人</th>
									<th>灭菌网篮</th>
									<th>灭菌准备时间</th>
									<th>同一个网篮的包</th>

								</tr>
							</thead>
							<tbody>


								<c:if test="${dabaoList != null}">
									<c:forEach items="${dabaoList}" var="dabao">
										<tr>

											<td>${mijunzhunbeirenName}</td>
											<td>${dabao.miejunWanglanTiaoma}</td>
											<td><fmt:formatDate value="${dabao.miejunZhunbeiTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>

											<td><a id="wanglanbao">查看详细</a></td>



										</tr>
									</c:forEach>
								</c:if>
							</tbody>
						</table>
					</div>
				</div>
				<!--表格结束-->
				<%--小模块结束--%>

				<%--小模块开始 --%>
				<hr
					style="height: 3px; width: 40%; border: none; border-top: 2px solid #009933;" />
				<span class="biaoti" id="bt51">灭菌信息</span>

				<!--表格开始-->
				<div class="table">

					<!--表格具体内容-->
					<div class="table-box">
						<table>
							<thead>
								<tr>
									<th>灭菌设备条码</th>

									<th>灭菌设备名字</th>
									<th>灭菌程序</th>
									<th>灭菌人</th>
									<th>灭菌开始时间</th>
									<th>灭菌结束时间</th>
									<th>灭菌审核人</th>
									<th>灭菌审核结果</th>
									<th>灭菌状态</th>
									<th>一起灭菌的包</th>
								</tr>
							</thead>
							<tbody>


								<c:if test="${dabaoList != null}">
									<c:forEach items="${dabaoList}" var="dabao">
										<tr>

											<td>${dabao.miejunShebeiTiaoma}</td>
											<td>${miejunshebeiname}</td>
											<td>${miejunsoftname}</td>
											<td>${miejunrenname}</td>
											<td><fmt:formatDate value="${dabao.miejunKaishiTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>
											<td><fmt:formatDate value="${dabao.miejunJieshuTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>
											<td>${miejunshenherenName}</td>
											<td><c:if test="${dabao.miejunHege==0}">不合格</c:if> <c:if
													test="${dabao.miejunHege==1}">合格</c:if></td>
											<td><c:if test="${dabao.miejunZhuangtai==0}">待灭菌</c:if>
												<c:if test="${dabao.miejunZhuangtai==1}">灭菌中</c:if> <c:if
													test="${dabao.miejunZhuangtai==2}">灭菌完成</c:if></td>
											<td><a href="#" id="wanglanbao">查看详细</a></td>



										</tr>
									</c:forEach>
								</c:if>
							</tbody>
						</table>
					</div>
				</div>
				<!--表格结束-->
				<%--小模块结束--%>



				<%--小模块开始 --%>
				<hr
					style="height: 3px; width: 40%; border: none; border-top: 2px solid #33CCFF;" />
				<span class="biaoti" id="bt6">物品发放</span>

				<!--表格开始-->
				<div class="table">

					<!--表格具体内容-->
					<div class="table-box">
						<table>
							<thead>
								<tr>

									<th>发放人</th>
									<th>发放科室</th>
									<th>发放时间</th>


								</tr>
							</thead>
							<tbody>


								<c:if test="${dabaoList != null}">
									<c:forEach items="${dabaoList}" var="dabao">
										<tr>

											<td>${fafangrenName}</td>
											<td>${dabao.fafangLiushui}</td>
											<td>${dabao.fafangLiushui}</td>


										</tr>
									</c:forEach>
								</c:if>
							</tbody>
						</table>
					</div>
				</div>
				<!--表格结束-->
				<%--小模块结束--%>
				<%--小模块开始 --%>
				<hr
					style="height: 3px; width: 40%; border: none; border-top: 2px solid #00CC33;" />
				<span class="biaoti" id="bt7">使用记录</span>

				<!--表格开始-->
				<div class="table">

					<!--表格具体内容-->
					<div class="table-box">
						<table>
							<thead>
								<tr>

									<th>使用科室</th>
									<th>使用病人编号</th>
									<th>病人姓名</th>
									<th>病人住院号</th>
									<th>病人手术类型</th>

									<th>使用时间</th>



								</tr>
							</thead>
							<tbody>


								<c:if test="${dabaoList != null}">
									<c:forEach items="${dabaoList}" var="dabao">
										<tr>

											<td>${dabao.patientId}</td>
											<td>${dabao.patientId}</td>
											<td>${dabao.patientHospitalNo}</td>
											<td>${dabao.shoushuTemplate}</td>
											<td>${dabao.patientHospitalNo}</td>
											<td><fmt:formatDate value="${dabao.shiyongTime}"
													type="date" pattern="yyyy-MM-dd HH:mm:ss" /></td>
										</tr>
									</c:forEach>
								</c:if>
							</tbody>
						</table>
					</div>
				</div>
				<!--表格结束-->
				<%--小模块结束--%>

			</div>
		</div>
		<div id="saper-ft">
			<div id="kkpager"></div>
		</div>
	</div>

</body>


<script type="text/javascript">
$(function(){
	$("#huishouwanglan").click(function(){
		alert("回收网篮");
		
		layer.open({
		  type: 2,
		  title: '同一个网篮的包',
		  maxmin: true,
		  moveOut:true,
		 
		  shadeClose: true, //点击遮罩关闭层
		  area : ['700px' , '450px'],
		  content: "${ctx}/zhuisuPackage/huishouwanglan.do"
		});
		
	});
		
	
	$(".query-btn").click(function() {
		alert("what can i do for you ?");
		window.location.href = "${ctx}/zhuisuPackage/packageingList.do?searchTxt="+$(".search_text").val();
	});
})

		
</script>
</html>